package com.jic.order.entity;

import com.jic.order.manage.request.MOrderBale;
import com.jic.order.manage.request.MOrderGoods;
import com.jic.order.manage.request.MOrderPay;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单父表
 *
 * @author :
 * @version : v1.0.0
 * @email :
 * @since : 2020-01-24 11:38:33
 */
@Getter
@Setter
public class OrderParent implements Serializable {

	private static final long serialVersionUID = 1L;

	// 主键ID
	private long id;

	// 主键ID
	private Long distrbutionId;
	// 请求流水号
	private String serialNo;
	// 订单父编号
	private String parentOrderNo;
	// 销售渠道
	private Integer saleChannel;
	// 购买人
	private long buyerId;
	//  是否分销员 1.是 2.否
	private Integer buyerType;
	// 购买时间
	private Date buyerTime;
	// 订单状态，com.jic.order.enums.OrderStatusEnum
	private Integer orderStatus;
	// 收货人省id
	private Long receiverProvinceId;
	// 收货人省名称
	private String receiverProvinceName;
	// 收货人市id
	private Long receiverCityId;
	// 收货人市名称
	private String receiverCityName;
	// 收货人区/县id
	private Long receiverCountryId;
	// 收货人区/县名称
	private String receiverRegionName;
	// 收货人名字
	private String receiverName;
	// 收货人电话
	private String receiverPhone;
	// 收货人详细地址
	private String receiverAddress;
	// 销售总金额
	private BigDecimal saleTotalAmount;
	// 优惠总金额，优惠金额=销售总金额-购买总金额
	private BigDecimal discountTotalAmount;
	// 购买总金额，购买总金额=销售总金额-优惠总金额
	private BigDecimal buyTotalAmount;
	// 物流总费
	private BigDecimal expressTotalFee;
	// 实付总金额，实付总金额=购买总金额+物流总费
	private BigDecimal actualPayTotalAmount;
	// 版本号
	private long version;
	// 创建人
	private long creator;
	// 创建人名字
	private String createName;
	// 创建时间
	private Date createTime;
	// 修改人
	private long updater;
	// 修改人名字
	private String updaterName;
	// 修改时间
	private Date updateTime;
	// 1标识已删除，0标识未删除
	private Integer deleteFlag;
	// 运营方ID
	private long deptId;
    //来源渠道（0-全部 1-APP 2-商城小程序 3-企业微信 4-We2000公众号 5-商城公众号 6-其他）
    private Integer sources;

    @ApiModelProperty(notes = "订单支付表")
    private MOrderPay mOrderPay;

    @ApiModelProperty(notes = "订单商品表")
    private MOrderGoods mOrderGoods;

    @ApiModelProperty(notes = "订单包裹表")
    private MOrderBale mOrderBale;

    @ApiModelProperty(notes = "发票ID")
    private Long invoiceId;
    // 支付到期时间
    private Date paymentExpire;

}
